﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.Tools.Cache
{
    /// <summary>
    /// 本地缓存接口
    /// </summary>
    public interface ICacheManager
    {
        /// <summary>
        /// 获取本地缓存
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        bool Get<T>(ValueType key,out T value);
        /// <summary>
        /// 设置本地缓存
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void Set<T>(ValueType key,T value);
        /// <summary>
        /// 删除缓存
        /// </summary>
        /// <param name="key"></param>
        void Remove(ValueType key);
    }
}
